package wudl.bigdata.db.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
import wudl.bigdata.db.bean.HiveTableBean;
import wudl.bigdata.db.service.impl.HiveTableServiceImpl;

import java.util.List;
import java.util.Map;

/**
 * @Author: wudl
 * @Description:
 * @ClassName: HiveController
 * @Date: 2023/5/28 16:13
 */
@RestController
public class HiveController {

    @Autowired
    HiveTableServiceImpl hiveTableService;

    @GetMapping ("/gethiveListTable")
    public List<String> getUserList()
    {

        return  hiveTableService.tableList();
    }

    @PostMapping ("/gethiveListTable")
    public List<String> getPostUserList(@RequestBody HiveTableBean hiveTableBean)
    {

        return  hiveTableService.PosttableList(hiveTableBean);
    }

    @PostMapping ("/gethiveListmap")
    public List<Map<String,Object>> getPostListMap(@RequestBody HiveTableBean hiveTableBean)
    {
        return  hiveTableService.getPostListMap(hiveTableBean);
    }


}
